import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { NavigationContainer } from "@react-navigation/native"
import { createStackNavigator } from "@react-navigation/stack";

const RootStack = createStackNavigator()
const HomeStack = createStackNavigator()

import Home from './Home'
import Goods from './GoodsDetail/index'

export default class index extends Component {
    constructor(props) {
        super(props);
        this.state = {
        };
    }


    HomeModule = () => {
        return (
            <HomeStack.Navigator initialRouteName='Home' headerMode={'screen'}>
                <HomeStack.Screen name='Home' component={Home} />
                <HomeStack.Screen name='Goods' component={Goods} />
            </HomeStack.Navigator>
        )
    }

    render() {
        return (
            <NavigationContainer>
                <RootStack.Navigator initialRouteName='Home' mode='modal' headerMode={'none'}>
                    <RootStack.Screen name='Home' component={this.HomeModule} />
                </RootStack.Navigator>
            </NavigationContainer>
        );
    }
}